/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Test;

import java.awt.event.KeyEvent;
import javax.swing.JTable;

/**
 *
 * @author Administrador
 */
public class MyClass {

    static JTable table = new JTable();

    public static void main(String[] args) {
        table.addKeyListener(new java.awt.event.KeyAdapter() {

            public void keyReleased(final java.awt.event.KeyEvent evt) {
                tableKeyReleased(evt);
            }
        });
    }

    private static void tableKeyReleased(final java.awt.event.KeyEvent evt) {
        final int key = evt.getKeyCode();
        if (key == KeyEvent.VK_UP || key == KeyEvent.VK_DOWN
                || key == KeyEvent.VK_LEFT || key == KeyEvent.VK_RIGHT) {
            final int row = table.getSelectedRow();
            final int column = table.getSelectedColumn();

            final Object cellValue = table.getValueAt(row, column);

            if (cellValue == null) {
                return;
            }

        }
    }
}
